#include <iostream>
using namespace std;
 int shuixian(int n)
{ int a=0,b=0,c=0,sum=0;
  a=n%10;
  b=n/10%10;
  c=n/100;
  sum=a*a*a+b*b*b+c*c*c;
  if(sum==n) return 1;
  else return 0;
}
 int main()
{
      for(int n=100;n<=1000;n++)
        {
        if (shuixian(n))
          cout<< n <<endl;
    }
}
